package com.example.swagger2demo2.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping(value = "/genTable")
@Api(value="整体模型控制类",tags = "整体模型控制类",description = "整体模型控制类描述")
public class GenTableController {

    /**
     * 模型总表信息
     * @param page
     * @param limit
     * @return
     */
    @RequestMapping(value = "/model_list" , method = RequestMethod.GET)
    @ApiOperation(value="模型总表信息",notes="模型总表信息,分页查询",response=String.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "分页的起始页", required = true, dataType = "String"),
            @ApiImplicitParam(name = "limit", value = "每页显示的数量", required = true, dataType = "String")
    })
    public Map<String, Object> modellist(@RequestParam(value="page",defaultValue="1") String page, @RequestParam (value="limit",defaultValue="10") String limit) {
        Map<String, Object> rtnMap = new HashMap<String, Object>();
        rtnMap.put("code", 500);
        rtnMap.put("msg", "success");
        rtnMap.put("code", "0");
        rtnMap.put("data", null);
        rtnMap.put("count", 0);

        return rtnMap;
    }


}
